# 8.使用while，完成以下图形的输出
# *
# **
# ***
# ****
# *****

i = 1
while i <= 5:
    j = 1
    while j <= i:
        print('*', end=' ')
        j += 1
    print()
    i += 1

# 注：下面这道题和上面差不多，主要是找规律
# *
# ***
# *****
# *******
# *********

i = 1
while i <= 9:
    j = 1
    while j <= i:
        print('*', end=' ')
        j += 1
    print()
    i += 2




